﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;


namespace $safeprojectname$
{
    /// <summary>
    ///     The Entity constructor. This is the only way how Entities should be constructed in the application
    /// </summary>
    /// <typeparam name = "TEntity"></typeparam>
    /// <typeparam name="TID"></typeparam>
    public interface IEntityFactory<out TEntity, in TID> : IFacade
        where TEntity : class, IPersistentObjectWithTypedId<TID>
    {
        /// <summary>
        ///     Returns new transient entity 'T'.
        ///     If overriden, some properties could be preset to business defaults.
        ///     (some Business rules therefore could be met).
        ///     Factory method instead of constructor is working also for interface or abstract 'T'...
        /// </summary>
        /// <returns>new entity 'T' transient</returns>
        TEntity CreateNew();
    }
}